﻿using System;
#if NETFX_CORE
using Windows.UI.Xaml;
#else
using System.Windows;
#endif

namespace FreshMeat.Xaml
{
   /// <summary>
   /// Stub for easier Silverlight/WPF compatibility.
   /// </summary>
   public class FrameworkPropertyMetadata : PropertyMetadata
   {
      public FrameworkPropertyMetadata(PropertyChangedCallback propertyChangedCallback)
         : base(propertyChangedCallback)
      {
      }

      public FrameworkPropertyMetadata(object defaultValue)
         : base(defaultValue)
      {
      }

      public FrameworkPropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback)
         : base(defaultValue, propertyChangedCallback)
      {
      }

      public FrameworkPropertyMetadata(object defaultValue, FrameworkPropertyMetadataOptions flags)
         : base(defaultValue)
      {
      }

      public FrameworkPropertyMetadata(object defaultValue, FrameworkPropertyMetadataOptions flags, PropertyChangedCallback propertyChangedCallback)
         : base(defaultValue, propertyChangedCallback)
      {
      }
   }

   [Flags]
   public enum FrameworkPropertyMetadataOptions
   {
      None = 0x000,
      AffectsMeasure = 0x001,
      AffectsArrange = 0x002,
      AffectsParentMeasure = 0x004,
      AffectsParentArrange = 0x008,
      AffectsRender = 0x010,
      Inherits = 0x020,
      OverridesInheritanceBehavior = 0x040,
      NotDataBindable = 0x080,
      BindsTwoWayByDefault = 0x100,
      Journal = 0x400,
      SubPropertiesDoNotAffectRender = 0x800,
   }
}
